<template>
    <div class="recommend">
        <main class="recommend-main">
            <entry v-for="item in entry.data" :key="item.id" :obj="item" ></entry>
        </main> 

    </div>
</template>
<script>
// 引入滚动事件
import entry from '../components/entry.vue'
import {mapState}  from "vuex"
export default {
    name:"recommend",
    components:{
        entry
    },
     computed:{
        ...mapState(["userToken","entry"]),
    },
    beforeRouteLeave(to,from,next){
        this.$store.state.fromPagePath =from.path;
        next();
    },
    
}
</script>
<style lang="scss" scoped>
</style>